#ifndef WORK_H
#define WORK_H

#include <QWidget>
// #include<opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "lib/ConfigWork.h"
class SuperpixelSegmentation;
class WatershedSegmentation;
namespace Ui {
class Work;
}

class Work : public QWidget
{
    Q_OBJECT

public:
    explicit Work(QWidget *parent = nullptr);
    ~Work();

private:
    Ui::Work *ui;
    QString _path;
    cv::Mat _mat;
    QImage _exportImage;
    EnumImageSegmentation _enumSegmentation;
    SuperpixelSegmentation *seg_superpixel;
    WatershedSegmentation *seg_watershed;
public slots:
    void SlotImagePath(QString path);
    void SlotSaveImagePath(QString path);
    void SlotImageIsNull();
    void SlotSegmentationString(QString str);
private slots:
    void on_pic_transform_clicked();
    // void on_btn_transform_clicked();
    void on_btn_transform_clicked();
    void on_pic_smooth_clicked();
    void on_btn_smooth_clicked();
    void on_pic_edge_clicked();
    void on_btn_edge_clicked();
    void on_pic_filter_clicked();
    void on_btn_filter_clicked();
    void on_pic_superpixel_clicked();

    void on_btn_execute_clicked();

    void on_pic_watershed_clicked();

signals:
    void SignImageIsNull();
};

#endif // WORK_H
